home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1998-09-12 | 1.5 KB | 61 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "TimeObj"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Option Explicit
-
- ' ***************************************************
- ' This code is for a basic object containing an object
- ' property (the owner to notify when done), and methods
- ' for starting and stopping the async procedure.
- '
- ' In the TimeModule.Bas file is the main routine
- ' which you will need to modify to perform your desired
- ' behavior (TimeLoop).
- ' ***************************************************
-
- Private mvarNotify As Object
- Private mvarCanceled As Boolean
- Private mvarTimer As Long
-
- Friend Property Get Notify() As Object
- Set Notify = mvarNotify
- End Property
- Friend Property Set Notify(Value As Object)
- Set mvarNotify = Value
- End Property
- Friend Property Get TimerID() As Long
- TimerID = mvarTimer
- End Property
- Friend Property Let TimerID(ByVal Value As Long)
- mvarTimer = Value
- End Property
- Public Property Get Canceled() As Boolean
- DoEvents ' DoEvents is called to allow other applications
- ' to set the value of the canceled property.
- Canceled = mvarCanceled
- End Property
- Public Property Let Canceled(ByVal Value As Boolean)
- mvarCanceled = Value
- End Property
-
- Public Sub StartApp(ToNotify As Object)
- Canceled = False
- Set Notify = ToNotify
- StartTimer Me
- End Sub
-
- Public Sub StopApp()
- Canceled = True
- End Sub
-
-
-
-
-
-